首页> 外文OA文献 >On Practical SMT-Based Type Error Localization
【2h】

On Practical SMT-Based Type Error Localization

机译:基于smT的实用型误差定位研究

代理获取
本网站仅为用户提供外文OA文献查询和代理获取服务,本网站没有原文。下单后我们将采用程序或人工为您竭诚获取高质量的原文,但由于OA文献来源多样且变更频繁,仍可能出现获取不到、文献不完整或与标题不符等情况,如果获取不到我们将提供退款服务。请知悉。

摘要

Compilers for statically typed functional programming languages are notoriousfor generating confusing type error messages. When the compiler detects a typeerror, it typically reports the program location where the type checking failedas the source of the error. Since other error sources are not even considered,the actual root cause is often missed. A more adequate approach is to considerall possible error sources and report the most useful one subject to someusefulness criterion. In our previous work, we showed that this approach can beformulated as an optimization problem related to satisfiability modulo theories(SMT). This formulation cleanly separates the heuristic nature of usefulnesscriteria from the underlying search problem. Unfortunately, algorithms thatsearch for an optimal error source cannot directly use principal types whichare crucial for dealing with the exponential-time complexity of the decisionproblem of polymorphic type checking. In this paper, we present a new algorithmthat efficiently finds an optimal error source in a given ill-typed program.Our algorithm uses an improved SMT encoding to cope with the high complexity ofpolymorphic typing by iteratively expanding the typing constraints from whichprincipal types are derived. The algorithm preserves the clean separationbetween the heuristics and the actual search. We have implemented our algorithmfor OCaml. In our experimental evaluation, we found that the algorithm reducesthe running times for optimal type error localization from minutes to secondsand scales better than previous localization algorithms.
机译:静态类型函数编程语言的编译器因生成令人困惑的类型错误消息而臭名昭著。当编译器检测到类型错误时,通常会报告类型检查失败的程序位置作为错误源。由于甚至没有考虑其他错误源,因此常常会遗漏实际的根本原因。一种更适当的方法是考虑所有可能的错误源,并根据有用性标准报告最有用的一个。在我们之前的工作中,我们证明了该方法可以被表述为与可满足性模理论(SMT)相关的优化问题。这种表述将有用性标准的启发式性质与潜在的搜索问题完全分开。不幸的是,寻找最佳错误源的算法不能直接使用对于处理多态类型检查的决策问题的指数时间复杂性至关重要的主体类型。在本文中,我们提出了一种新算法,可以在给定的不良类型程序中有效地找到最佳错误源。我们的算法使用改进的SMT编码,通过迭代扩展从主要类型派生的类型约束来应对多态类型的高复杂性。该算法保留了启发式搜索与实际搜索之间的清晰分隔。我们已经为OCaml实现了算法。在我们的实验评估中,我们发现该算法将最佳类型错误定位的运行时间从几分钟减少到了几秒钟,并且比以前的定位算法具有更好的伸缩性。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
代理获取

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号